import request from "@/utils/request.js";

//轮播
export function apiGetBanner(data){
  return request.request({
    url:'/banner',
    method:'GET',
    data
  })
}
//推荐歌单
export function apiGetRecommendSongs(data){
  return request.request({
    url:'/personalized',
    method:'GET',
    data,
  })
}
//新碟新歌
export function apiGetTopAlbum(data){
  return request.request({
    url:'/album/newest',
    method:'GET',
    data
  })
}
//精选视频
export function apiGetRelatedVideo(data){
  return request.request({
    url:'/related/allvideo',
    method:'GET',
    data
  })
}
//视频导航条
export function apiGetNavList(data){
  return request.request({
    url:'/videomock',
    method:'GET',
    data
  })
}
//登录
export function apiLogin(data){
  return uni.request({
    url:'http://localhost:3001/list',
    method:'GET',
    data
  })
}
//用户详情
export function apiUserDetail(data){
  return request.request({
    url:'/user/detail?uid=32953014',
    method:"GET",
    data
  })
}
//登出
export function apiLogout(data){
  return request.request({
    url:'/logout',
    method:"GET",
    data
  })
}
//广告页
// export function apiAd(data){
//   return request.request({
//     url:'/logout',
//     method:"GET",
//     data
//   })
// }
//热搜榜
export function apiGetSearchHot(data){
  return request.request({
    url:'/search/hot/detail',
    method:"GET",
    data
  })  
}
//搜索接口
export function apiGetSearchSuggest(data){
  return request.request({
    url:'/search/suggest',
    method:'GET',
    data
  })
}
//歌单详情
export function apiAlbumDetail(data){
  return request.request({
    url:'/playlist/detail',
    method:'GET',
    data
  })
}

//获取歌曲链接
export function apiGetSongUrl(data){
  return request.request({
    url:'/song/url',
    method:'GET',
    data    
  })
}
//获取歌曲详情
export function apiGetSongDetail(data){
  return request.request({
    url:'/song/detail',
    method:'GET',
    data
  })
}
//搜索
export function searchMusic(data){
  return request.request({
    url:'/search?keywords='+data,
    method:'GET',
    data
  })
}